<?php
/**
 * func.php
 * 获取类的所有方法
 * @author: Skiychan <developer@zzzzy.com>
 * @created: 2015/1/26
 * @modified:
 */

if (isset($_GET['ext'])) {
    include "class/".$_GET['ext'].".class.php";
}

include "class/".$_GET['file'].".class.php";

$class_methods = get_class_methods($_GET['file']);
$log = "";
foreach ($class_methods as $method_name) {
    $log .= "$method_name\n";
    echo "$method_name\n";
}

$logfile = "test/".$_GET['file'].".txt";
if (!file_exists($logfile)) {
    file_put_contents($logfile, $log);
}